using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SimpleGPSApp.Base;

namespace SimpleGPSApp.Forms
{
    public partial class FormSettings : Form
    {
        private Config configuration;

        public Config Configuration
        {
            get { return configuration; }
            set
            {
                configuration = value;
                if (configuration != null)
                {
                    configControl1.Configuration = configuration;
                }
            }
        }

        public FormSettings()
        {
            InitializeComponent();
        }

        private void FormSettings_Closing(object sender, CancelEventArgs e)
        {
            try
            {
                this.configuration = this.configControl1.Configuration;
                configControl1.Configuration.SaveConfig();
            }
            catch { }
        }
    }
}